#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
#import <KwaiSDK/KSApi.h>

@interface AppDelegate() <KwaiSDKLogDelegate>

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];
    
//    [KSApi registerApp:@"ks683702720919932779" universalLink:@"https://doulehui.jleduyun.com/app/" delegate:self];
  // Override point for customization after application launch.
  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    NSLog(@"1-日志：%@",url);
    return [KSApi handleOpenURL:url];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    NSLog(@"2-日志：%@",url);
    return [KSApi handleOpenURL:url];
}

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
    NSLog(@"3-日志：%@",url);
    NSLog(@"3-日志：%@",url);
    return [KSApi handleOpenURL:url];
}

- (void)onLog:(NSString*)log logLevel:(KwaiSDKLogLevel)level{
    NSLog(@"4-日志：%@",log);
    
}

- (void)onStatistics:(NSString*)key value:(NSString *)value{
    NSLog(@"5-日志：%@,%@",key,value);
}
@end
